<template>
  <BasicModal v-bind="$attrs" width="60%" title="查看详情" :showOkBtn="false" @register="registerModal">
    <Description :bordered="false" :column="3" :data="refundData" :schema="descSchema" />
  </BasicModal>
</template>
<script lang="ts" setup name="PayRefundModal">
import { ref } from 'vue';

import { getRefund } from '@/api/pay/refund';
import { Description } from '@/components/Description';
import { BasicModal, useModalInner } from '@/components/Modal';

import { descSchema } from './refund.data';

const refundData = ref();

const [registerModal, { setModalProps }] = useModalInner(async (data) => {
  setModalProps({ confirmLoading: false });
  const res = await getRefund(data.record.id);
  refundData.value = res;
});
</script>
